Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable one-click debugging via the "Enable debug logging" option when re-running Actions jobs #1132

Merged
merged 10 commits into from
Jul 12, 2022

Conversation

henrymercer
Copy link
Contributor

(As @adityasharad pointed out on the internal issue, it's actually three clicks, but you get the point :))

Users can now quickly debug a job that uses the CodeQL Action by re-running the job from the GitHub UI and selecting the "Enable debug logging" option. Debugging mode is also automatically turned on if Actions step debugging is enabled on a repo by setting the ACTIONS_STEP_DEBUG secret to true. This PR also brings all of our debugging functionality under the same banner, e.g. we print the CodeQL CLI debug logs when debug: true, not just when Actions step debugging is enabled.

Example run: the first run is the standard workflow, attempt 2 (i.e. the rerun) was triggered with the "Enable debug logging" option selected.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@henrymercer henrymercer requested a review from a team as a code owner July 1, 2022 17:48
This commit prints diagnostic messages to the Actions log when debug
logging is enabled by passing `debug: true` to `codeql-action/init` or
enabling Actions step debug logging.
src/analyze-action.ts Outdated Show resolved Hide resolved
@henrymercer henrymercer merged commit 1e7f770 into main Jul 12, 2022
@henrymercer henrymercer deleted the henrymercer/one-click-debug branch July 12, 2022 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants